package com.leo;

import javafx.beans.property.SimpleIntegerProperty;

/**
 * @ClassName IntegerBindingDemo
 * @Description
 * @Author wangss
 * @date 2020.06.01 20:57
 * @Version 1.0
 */
public class IntegerBindingDemo {

    public static void main(String[] args) {

        SimpleIntegerProperty sip = new SimpleIntegerProperty(5);

        CustomIntegerBinding custom = new CustomIntegerBinding(10);

        sip.bind(custom);

        custom.setX(20);

        System.out.println("custom = " + custom.get());
        System.out.println("sip = " + sip.get());


    }
}
